﻿using BCCommon;
using BCDto.Common.Area;
using BCDto.Sim.Admin.Admin;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.Common.Area
{
    /// <summary>
    /// 区县信息服务
    /// </summary>
    public interface ICountyService
    {
        /// <summary>
        /// 添加区县信息
        /// </summary>
        /// <param name="dto">区县信息</param>
        /// <param name="adminDto"></param>
        /// <returns></returns>
        bool Add(CountyRequestDto dto, AdminDto adminDto);
        /// <summary>
        /// 修改区县信息
        /// </summary>
        /// <param name="dto">区县信息</param>
        /// <param name="adminDto"></param>
        void Update(CountyPutDto dto, AdminDto adminDto);
        /// <summary>
        /// 删除区县信息
        /// </summary>
        /// <param name="countyCode">区县编码</param>
        void Delete(string countyCode);
        /// <summary>
        /// 获取区县信息
        /// </summary>
        /// <param name="countyId">区县Id</param>
        /// <returns></returns>
        CountyDto GetCountyById(long countyId);
        /// <summary>
        /// 获取区县信息
        /// </summary>
        /// <param name="countyCode">区县编码</param>
        /// <returns></returns>
        CountyDto GetCountyByCode(string countyCode);
        /// <summary>
        /// 获取区县列表（分页）
        /// </summary>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="cityCode">城市编码</param>
        /// <param name="countyCode">区县编码</param>
        /// <param name="index">当前页码</param>
        /// <param name="size">每页数据条数</param>
        /// <returns></returns>
        PageableList<CountyDto> GetCounties(string provinceCode, string cityCode, string countyCode,int index, int size);
        /// <summary>
        /// 查询城市
        /// </summary>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="cityCode">城市编码</param>
        /// <returns></returns>
        IEnumerable<CountyDto> Query(string provinceCode, string cityCode);
        /// <summary>
        /// 查询城市
        /// </summary>
        /// <param name="cityId">城市Id</param>
        /// <returns></returns>
        IEnumerable<CountyViewDto> Query(long cityId);
        /// <summary>
        /// 修改区县议价
        /// </summary>
        /// <param name="countyCode">区县编码</param>
        /// <param name="isNegotiatedPrice">需要议价</param>
        /// <returns></returns>
        bool UpdateCountyNegotiatedPrice(string countyCode, bool isNegotiatedPrice);

        /// <summary>
        /// 更新区县信息
        /// </summary>
        /// <param name="editer">编辑人</param>
        /// <param name="countyCode">区县编码</param>
        /// <param name="countyName">区县名称</param>
        /// <param name="provinceCode">省编码</param>
        /// <param name="provinceName">省名称</param>
        /// <param name="cityCode">市编码</param>
        /// <param name="cityName">市名称</param>
        /// <param name="longitude">经度</param>
        /// <param name="latitude">纬度</param>
        /// <param name="batchNo">批号</param>
        /// <returns></returns>
        CountyDto UpdateCounty(string editer, string countyCode, string countyName, string provinceCode, string provinceName, string cityCode, string cityName, double longitude, double latitude, string batchNo);

        /// <summary>
        /// 不存在新地图信息插入未匹配上的数据
        /// </summary>
        /// <param name="batchNo">批号</param>
        bool UpdateIsEnabled(string batchNo);
    }
}
